#include "CKiloutouMachine.h"
#include <Ibquery.hpp>
#include "dm_Kiloutou.h"

//------------------------------------------------------------------------------
__fastcall CKiloutouMachine::CKiloutouMachine( const AnsiString &asNom,
                                               const AnsiString &asDescription,
                                               const double &dPrix,
                                               const int &ID_Materiel)
{
    m_asNom                  = asNom;
    m_asDescription          = asDescription;
    m_dPrixDeLocationMensuel = dPrix;
    m_ID_Materiel            = ID_Materiel;
}

//------------------------------------------------------------------------------
__fastcall CKiloutouMachine::CKiloutouMachine( void )
{
    m_asNom                  = "";
    m_asDescription          = "";
    m_dPrixDeLocationMensuel = 0;
}

//------------------------------------------------------------------------------

AnsiString __fastcall CKiloutouMachine::GetLibelle( void )
{
    return Nom + " " + Description + " " + Prix;
}

//---------------------------------------------------------------------------

void __fastcall CKiloutouMachine::AjouterListe( TStrings * MaStrings )
{

    //MaStrings->AddObject( this->Nom, (TObject*) this );
}
//---------------------------------------------------------------------------

void __fastcall CKiloutouMachine::EffacerTable( void )
{
    dmKiloutou->dsMateriel->DataSet->Delete();
    dmKiloutou->trKiloutou->CommitRetaining();

        //Refresh du dataset
    dmKiloutou->dsetLocation->Active = false;
    dmKiloutou->dsetLocation->Active = true;
}



